<extend name="Base/common"/>
<block name="style">
    <link href="__CSS__/jxgl.css" type="text/css" rel="stylesheet">
</block>
<block name="header">
    <include file="Public/_nav"/>
</block>
<block name="body">

      <!--   <include file="Public/_hot_sell"/> -->
        <!-- 左侧菜start -->
        <div class="col-xs-2">
             <div class="common_block_border">                
                <div class="content ">
                <include file="Public/sidebar"  />
                </div>
            </div>
        </div>
        <!-- 左侧菜end -->

        <!-- 右侧内容开始 -->
        
        <div class="col-xs-10">
        <section>
        <div class="common_block_border">        
        <ul class="nav nav-tabs">
          <li class="active"><a href="{:U('Xshj/index')}">学生获奖登记</a></li>
          <li><a href="{:U('Xshj/hjhz')}">学生获奖情况汇总</a></li>
          <if condition="check_auth('Admin/Index/index')"><li><a href="{:U('Xshj/cate')}">获奖等级设置</a></li></if>
        </ul>
           

  <!-- 登记表单start -->
     <div class="tab-content">
     <div class="right_box">
      <form class="form-horizontal form-condensed" role="form" method="post" action="{:U('Xshj/index')}" >
        <legend>教学管理 : <span style="color:#CC4444"> 学生获奖登记</span></legend>
        <div class="form-group">
          <label class="col-md-2 control-label required">班级</label>
          <div class="col-md-3">
                 <select name="class" id="class" class="form-control">
                 <volist name='classlist' id='vo'>
                  <option value="{$vo.bj_name2}">{$vo.bj_name}</option>
                 </volist>
                 </select>
           <!--  <input name="class" id="class" value="" class="form-control" type="text" style="ime-mode:active"> -->
          </div>
          <label class="col-md-2 control-label required">获奖学生</label>
          <div class="col-md-4">
          <input name="student" id="student" value="" class="form-control" type="text" style="ime-mode:active">
          </div> 
        </div>
        <div class="form-group">
          <label class="col-md-2 control-label required">指导教师</label>
          <div class="col-md-3">
            <input name="teacher" id="teacher" value="" class="form-control" type="text" style="ime-mode:active">
          </div>
          <label class="col-md-2 control-label required">获奖日期</label>
          <div class="col-md-4">
              <input name="date" id="date" value="{:date(Y)}-{:date(m)}" class="time form-control input-group date form_datetime" type="text" style="ime-mode:inactive">
				    <link href="__ZUI__/lib/datetimepicker/datetimepicker.min.css" rel="stylesheet" type="text/css">
				    <script src="__ZUI__/lib/datetimepicker/datetimepicker.min.js"></script>
				    <script>

				        $('.time').datetimepicker({
				            language:  'zh-CN',
				            weekStart: 1,
				            todayBtn:  1,
				            autoclose: 1,
				            todayHighlight: 1,
				            startView: 2,
				            minView: 2,
				            forceParse: 0,
				            format: 'yyyy-mm'
				        });
				    </script>           
          </div>
        </div>

        <div class="form-group">
          <label class="col-md-2 control-label required">获奖等级</label>
          <div class="col-md-3">
                 <select name="hjdj" id="hjdj" class="form-control">
                 <volist name='clist' id='vo'>
                 	<option value="{$vo.id}">{$vo.dj}</option>
                 </volist>
                 </select>
          </div>
          <label class="col-md-2 control-label required">举办单位</label>
          <div class="col-md-4">
             <input name="jbdw" id="jbdw" value="" class="form-control" type="text" style="ime-mode:active">
          </div>
        </div>


        <div class="form-group">
          <label class="col-md-2 control-label required">获奖内容</label>
          <div class="col-md-9 has-error">
             <input name="content" id="content" value="" class="form-control" placeholder="" type="text" style="ime-mode:active">       
          </div>
          <div class="col-md-offset-2 col-md-9 has-error">            
             <div class="help-block alert alert-warning">获奖日期仅填年月即可，如2016年6月23日，填写时为2016-06！<br/>请填写获县一等奖以上的奖项！</div>
          </div>
        </div>

        <div class="form-group">
          <label class="col-md-2 control-label">备注</label>
          <div class="col-md-9">
            <textarea name="bz" id="bz" rows="2" class="form-control"></textarea>
          </div>
        </div>

        <div class="form-group">
          <div class="col-md-offset-2 col-md-2">
             <input id="submit" class="btn btn-block btn-primary" value="提交保存" data-loading="稍候..." type="submit"> 
             <!-- <input name="id" id="id" value="{$data.id}" type="hidden"> -->
          </div>
        </div>
      </form>
    </div>
     <!-- 登记表单end -->

          <!-- 查询表单start -->
                <div class="right_box">
                    <form method='post' id="form1" name="form1"  action="{:U('Xshj/search')}" class="form-horizontal form-condensed">
                       <div class="form-group">
                       <label class="col-md-1 control-label" for="teacher">姓名:</label>
                       <div class="col-md-2">
                       <input type="text" class="form-control" name="teacher" value="{$teacher}">
                       </div>
                 
                       <div class="col-md-2">
                       <button type="submit" class="btn btn-primary">&nbsp;查询&nbsp;</button>
                       </div>
                  </form> 
                </div>
                <!--  查询表单end -->
      
      <div class="right_box">
      <table class="table table-bordered">
       <COL width="35px"></COL>
       <COL width="80px"></COL>
       <COL width="80px"></COL>
       <COL width="80px"></COL>
       <COL width="80px"></COL>
       <COL width="35%"></COL>
       <COL width="80px"></COL>
        <thead>
          <tr>
            <th class="text-center">#</th>
            <th class="text-center">获奖日期</th>
            <th class="text-center">班级</th>
            <th class="text-center">学生</th>
            <th class="text-center">获奖等级</th>            
            <th class="text-center">获奖内容</th>
            <th class="text-center">辅导教师</th>
            <!-- <th align="center">登记日期</th> -->
            <th class="text-center">操作</th>
          </tr>
        </thead>
        <tbody>
        <volist name='list' id='vo'>
          <tr>
            <td>{$i}</td>
            <td>
            <if condition="($vo.status neq 1)"> 
            <span style="color:red"> {$vo.date}</span>
             <else/>
            {$vo.date}
            </if>
            </td>            
            <td>{$vo.class}</td>
            <td>{$vo.student}</td>
            <td>{$vo.hjdj}</td> 
            <td>{$vo.content}</td>
            <td>{$vo.teacher}</td>
            <!-- <td>{$vo.create_time|date="Y-m-d",###}</td> -->
            <td><a href="{:U('Xshj/edit?id='.$vo['id'])}" ><i class="icon icon-edit"></i></a>｜
                <a href= "{:U('Xshj/delete?id='.$vo['id'])}"  onclick="return confirm('删除后不可恢复，你确认要删除吗？')"><i class="icon icon-trash"></i></a></td>
          </tr>
          </volist>
        </tbody>
      </table>
      </div>
      <div class="text-right"> 
        &nbsp; {:getPagination($totalPageCount,$r)}
      </div>    
    </div>
    </section>
    </div> 
        <!-- 右侧内容结束 --> 
</block>
